<extend name="Public:base"/>

<block name="main">
<div id="yzh-content">
    <div class="main-title">
        <h2>会员设置</h2>
    </div>

    <form id="myform" class="form-horizontal" method='post' action="{:U('Config/dosite')}">

        <volist name="member_config" id="vo">
        {if $vo[varname] =='member_getpwdemaitpl' || $vo[varname]=='member_emailchecktpl'}
        <div class="form-group">
            <label class="control-label col-md-2">{$vo.info}:</label>
            <div class="col-md-10">
                <textarea id="{$vo[varname]}" name="{$vo[varname]}" class="form-control">
                    {$vo['value']|htmlspecialchars}</textarea>
            </div>
        </div>
        {else}
        <div class="form-group">
            <label class="control-label col-md-2">{$vo.info}:</label>
            <div class="col-md-5">{:Form::radio(array('field'=>$vo[varname],'options'=>array('1'=>L('yes'),'0'=>L('no'))),$vo['value'])}</div>
        </div>
        {/if}

        </volist>

        <div class="form-actions">
            <input type="submit" value="保存" class="btn btn-sm btn-primary">
            <input type="reset" value="重置" class="btn btn-sm btn-primary">
        </div>
    </form>
</div>
    <script type="text/javascript" src="__STATIC__/kindeditor/kindeditor-min.js"></script>
    <script type="text/javascript">
        KindEditor.ready(function(K) {
            K.create('#member_emailchecktpl', {
                cssPath : '/Public/static/kindeditor/plugins/code/prettify.css',
                fileManagerJson:'/index.php?g=Admin&m=Attachment&a=index&isadmin=1&more=1&isthumb=0&file_limit=20&file_types=jpg,jpeg,gif,png,doc,docx,rar,zip,swf&file_size=5&moduleid=1&auth=03665ip6E4YS7tgbxBytG3St0OYqJCJ+YYCEjMD8l0SEmHSncP0syRnWN6zyS1IOujglPW8GFwo882jnFjMQZVkRMUo+I0J5wmrTAltR0w&l=zh-cn',
                editorid:'content',
                upImgUrl:'/index.php?g=Admin&m=Attachment&a=index&isadmin=1&more=1&isthumb=0&file_limit=1&file_types=gif,jpg,jpeg,png,bmp&file_size=5&moduleid=1&auth=14caN5eAor2hNmI46GNASXi5wT+r7qytNH1DwLikZyUdxu4PFjSXbHqnDNNnIPdRsV6penfzRTmLhbVnQQ&l=zh-cn',
                upFlashUrl:'/index.php?g=Admin&m=Attachment&a=index&isadmin=1&more=1&isthumb=0&file_limit=1&file_types=swf,flv&file_size=5&moduleid=1&auth=211ekeme5vPfm/xBs2vG2Wf78Wa058QEEDoSKvlFtbcfCvrYrD4weTUwonFc2cyG&l=zh-cn',
                upMediaUrl:'/index.php?g=Admin&m=Attachment&a=index&isadmin=1&more=1&isthumb=0&file_limit=1&file_types=mpg,wmv,avi,wma,mp3,mid,asf,rm,rmvb,wav,wma,mp4&file_size=5&moduleid=1&auth=c55e5KSDQ++y/l9TdkJ681dz4/uSBALNN28De1TsVdDPR6ft8+4Drnqe1LzADJNU9eeO7zGqF/UrosP3lTE1ruI5su3g+yQe5iFueMzAmSpB2ekI+8M2uQ&l=zh-cn',
                allowFileManager : true,
                filterMode: false,
                hunqinglineTag:'br',
                items: ['source', '|', 'fullscreen', 'undo', 'redo', 'cut', 'copy', 'paste','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright','justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', '|', 'selectall', '-','title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold','italic', 'underline', 'strikethrough', 'removeformat', '|', 'image', 'advtable', 'hr', 'link', 'unlink'],
                afterBlur: function () { this.sync(); }
            });
        });
    </script>
    <script type="text/javascript">
        KindEditor.ready(function(K) {
            K.create('#member_getpwdemaitpl', {
                cssPath : '/Public/static/kindeditor/plugins/code/prettify.css',
                fileManagerJson:'/index.php?g=Admin&m=Attachment&a=index&isadmin=1&more=1&isthumb=0&file_limit=20&file_types=jpg,jpeg,gif,png,doc,docx,rar,zip,swf&file_size=5&moduleid=1&auth=03665ip6E4YS7tgbxBytG3St0OYqJCJ+YYCEjMD8l0SEmHSncP0syRnWN6zyS1IOujglPW8GFwo882jnFjMQZVkRMUo+I0J5wmrTAltR0w&l=zh-cn',
                editorid:'content',
                upImgUrl:'/index.php?g=Admin&m=Attachment&a=index&isadmin=1&more=1&isthumb=0&file_limit=1&file_types=gif,jpg,jpeg,png,bmp&file_size=5&moduleid=1&auth=14caN5eAor2hNmI46GNASXi5wT+r7qytNH1DwLikZyUdxu4PFjSXbHqnDNNnIPdRsV6penfzRTmLhbVnQQ&l=zh-cn',
                upFlashUrl:'/index.php?g=Admin&m=Attachment&a=index&isadmin=1&more=1&isthumb=0&file_limit=1&file_types=swf,flv&file_size=5&moduleid=1&auth=211ekeme5vPfm/xBs2vG2Wf78Wa058QEEDoSKvlFtbcfCvrYrD4weTUwonFc2cyG&l=zh-cn',
                upMediaUrl:'/index.php?g=Admin&m=Attachment&a=index&isadmin=1&more=1&isthumb=0&file_limit=1&file_types=mpg,wmv,avi,wma,mp3,mid,asf,rm,rmvb,wav,wma,mp4&file_size=5&moduleid=1&auth=c55e5KSDQ++y/l9TdkJ681dz4/uSBALNN28De1TsVdDPR6ft8+4Drnqe1LzADJNU9eeO7zGqF/UrosP3lTE1ruI5su3g+yQe5iFueMzAmSpB2ekI+8M2uQ&l=zh-cn',
                allowFileManager : true,
                filterMode: false,
                hunqinglineTag:'br',
                items: ['source', '|', 'fullscreen', 'undo', 'redo', 'cut', 'copy', 'paste','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright','justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', '|', 'selectall', '-','title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold','italic', 'underline', 'strikethrough', 'removeformat', '|', 'image', 'advtable', 'hr', 'link', 'unlink'],
                afterBlur: function () { this.sync(); }
            });
        });
    </script>
<script type="text/javascript">
$(document).ready(function() {
    $('#myform').ajaxForm({
        success:  complete,  // post-submit callback
        dataType: 'json'
    });
});

function complete(data){
    if(data.status==1){
        $.scojs_message('修改成功', $.scojs_message.TYPE_OK);
        setTimeout(function(){
            window.location.href = '{:U("Config/member")}';
        },1000);
    }else{
        $.scojs_message(data.info, $.scojs_message.TYPE_ERROR);
    }

}
</script>

</block>